﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 玩家下注记录表
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Entity, DbConfig.Data, IsExpired = false)]
	public class SharedUserBetRecord : ShareEntity
	{
		public SharedUserBetRecord()
			: base(false)
		{
		}
		public SharedUserBetRecord(int userId, int tableId, int hand, int round, string betType, int betNum)
			: this()
		{
			this.UserID = userId;
			this.TableID = tableId;
			this.Hand = hand;
			this.Round = round;
			this.BetType = betType;
			this.BetNum = betNum;
		}

		/// <summary>
		/// 玩家ID
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true)]
		public int UserID { get; set; }

		/// <summary>
		/// GameTableData中的TableId
		/// </summary>        
		[ProtoMember(2)]
		[EntityField(true)]
		public int TableID { get; set; }

		[ProtoMember(3)]
		[EntityField(true)]
		public int Hand { get; set; }

		/// <summary>
		/// 回合数(一手牌共4个回合)
		/// </summary>
		[ProtoMember(4)]
		[EntityField(true)]
		public int Round { get; set; }

		/// <summary>
		/// 下注类型 参考PositionPlayState
		/// </summary>        
		[ProtoMember(5)]
		[EntityField]
		public string BetType { get; set; }

		/// <summary>
		/// 下注筹码
		/// </summary>        
		[ProtoMember(6)]
		[EntityField]
		public int BetNum { get; set; }
	}
}
